added log counter