Thermal stability of nitride thin films