added log clearing