Update function save_remote_file_to_local() and other code maintenance.