add query logs