Automate log file clearing