fix detection of external mdp file