adding tests and error handling
adding the callback when the download task has already run