[Downloader] Improved timeout handling in downloader