add logs of queries