improve error log messages