Improved error log behavior