added log prints.