add retries to file streaming