flush output in pipe