@Ellega 
You must use the wrapper function getRealFSReference() instead of reimplementing all the "PATH" computation (search for "getRealFSReference" in the code)