Stress relaxation-induced phase transformation in chromium nitride films