Changed I/O method to write file with TSP path