Update `download_file` function.