Added debug toggle for traces/warns