don't dump JSON when in debug mode.
wrap $q->qname in eval as it can sometimes throw a fatal