Updated references to temp file in exception handlers