refacto path manager