Replaced auto_temp_file with temp_file, which handles creation as well as deletion.