Added debug guarding mecanism