Error messages are written to the log.
Improved error message handling.