split output and error messages on newline