Add debug flag to suppress query logging to stdout