Controlling outputdirectory for distances.