Fixing file path in copy_to_local_file method