now log the queries