Got the file downloading working correctly