simplified path and subPath handling