improved error log