Flush output when done