Formation of toxic gases during pyrolysis of polyacrylonitrile and nylons