Set content type on error messages, and include a trailing newline