Mechanisms and byproduct formation in the application of chlorine dioxide