added retry for the whole upload