Remove extra \n character from end of error messages.