added log code