Added retry logic to the download service.