write node length to files