add flush to output