Added os.path.exists(temp_file_path) before removing it