Added the download file function (finally...  :)  )