More detailed debug output in distance calculation.