Correct error when handling temporary files.