examples: add flush after stats printing