Add max retries to backend upload