File handling, some of greedyTour