added log hooks