At some point the behavior of cups' cupsPrintFile changed to return immediately instead of waiting for the job to finish queueing up.

As a result of this, the temp file was getting deleted too soon causing the print job to fail. For the time being, I've commented out the code that deletes the temp file. In the long run, there needs to be a better solution that allows for the deletion of the temp file. A bug will be opened against this in github.