Add logging for search queries