do not output newline after last line in output file