Replace the old upload task if it is finished
Improve robustness of downloading/uploading files by try twice