fixed log cleanup