be sure to flush output if last line has no newline