ensure trailing newline