Thermal degradation and flame retardancy of epoxy resins containing intumescent flame retardant