Adding logging function to TinyQuery