Fix temp file processing