add resume and timeout for download