tweak to use getPath() everywhere.