Tweak to formatPath