improvements on error log