file downloading is finally working, I had been using the wrong download path in getFiles()