Thermal oxidation of silicon nitride and silicon oxynitride films