write degree-stat to file