The formation of hazardous substances in the loss of control of chemical industrial processes: the control of major accident hazard and inherent safety