handle the case when one of the urls is None in download_file()