Add option to automatically resume failed chunks up to maxRetries times before failing the file in progress.