fix idempotency of remote_file