First commit. Save distance to file for viewing