added some error handling for downloadFile() and made it retrive from prod API