added timeout to download_file