replaced getPath with getLocalRefPath to get real path instead of virtual path