Fix references to temp_file