Writing error messages to the user.