Corrected log cleanup