Improve error log format