Create distances.txt