downloadRemote function

Download a remote file