error log cleanup fixes