Added file buffer flushing every 100 API requests.