use rootPath to normalize return path value