add logging of queries and responses