add ability to log queries