Refactor remote operation to download file