Spectroscopic investigations of polyacrylonitrile thermal degradation