Improved formatting for error messages.