added log logic
added log logic