Adding query to log for debugging.