Add path_distance check