Fixing a bug. Now we compute the difference of distances and that is what we write to the .dat file