Terminate error messages with newline and allow redirection of error messages to a particular ostream