I have found the resolution to my earlier problem (I think).
What I realized is the following:
when you write a MATLAB script (*.m file) if you specify some local paths for your own (home made) files/folders, you would use addpath command for example:
addpath("Functions\");
this command however, as I understand, messes up with the built in paths and renders some of original MATLAB built-in paths invalid. That was the reason, when I opened a brand new MATLAB session, the scripts which did not have any "path" commands worked (hence finding the ephemeris file). As soon as I used the "path" command, the existing file could not be found. After some test and trial I found that adding my custom paths to the end of path list by the command:
addpath("Functions\",'-end');
worked fine.