I've previously used PreEnterSimulator, which is a good callback for the IFM to know when the model has been called by FePEST. Regarding the directory, I've been looking into IfmioGetPath and IfmioRelativePath... However, I have no idea how to use these to open files located with the model file. I'm looking for answers too.
However, if it's a static path, a simple ifstream could work, but probably not what you're looking for.