Adding log for query interface