#49 added log of sql query