save to file

save average distance to file