[ ] we add the given directory path to the matlab search path, which means that we you do not give the exact NIRFAST directory but one of its parent, it will still be added due to the recursive nature of genpath.
[ ] the path that is added when running the module is not currently removed, so selecting a new invalid path will not change the fact that the previous valid path is still available, and the module will run.
There seem to be two things to address: