Periodically flush trace data to disk automatically.