Remove trailing newline from output.