Added copy_to_local_file method