Wrapper functions for downloading files from an FTP or SFTP server