Adding the copy_to_local_file method