Ensure that FlushWritesToDataFileAsync will be run as separate background task. Also for background task set LongRunning option.