I use HP's UPD and noticed that the users would get an error [Bad File Status 9065 On File PRINT-FILE] when running a job for second time. Lawson's KB 5200220 was the key. To fix it I updated the UPD to v5.0.3 and it seems to have resolved the print handle not releasing the file.
It turns out to be a known issue with HP:
CR#2833: File handle not released on HPMUPxxx.BIN specific to UPD release version, which include filenames HPMUP081.bin, HPMUP083.bin, HPMUP084.bin and HPMUP091.bin. Issue was resolved in UPD version 4.7.2 and UPD v5.0.1, but not v5.0.0. Symptoms reported:
The downside is:
CR#4471: Filename HPMUPxxx.BIN (HPMUP081.bin, HPMUP083.bin, HPMUP084.bin or HPMUP091.bin) fails to shutdown during PC shutdown or restart. Current workaround is manually shutdown the *.BIN file process, or add the UPD’s *.BIN file process to list of applications allowed to be closed. Citrix environments see document http://support.citrix.com/article/CTX891671for additional details. HP continues to investigate resolution.