changed debug mode enum to a feature flag