Add sparse support for distance-to-sphere.
Fix log filenames.