Fix log messages to show the errors.