Warning: File 'NKMest/prior/definition.mat' not found

hi, everyone

I have a very strange question, I have write a mod file for an 2007. I can run it in dyanre correctly. But when I change the prior distribution, I have this error message, I am really confused, even if I change the prior back, I still have this error message. anyone can help me? thanks a lot. I attached the mod file and data file. (I am sorry that I can not attach the data file , but the data file is simulated from the mod file)

Warning: File ‘NKMest/prior/definition.mat’ not found.

In set_prior at 281
In dynare_estimation_init at 125
In dynare_estimation_1 at 37
In dynare_estimation at 62
In NKMest at 188
In dynare at 120
??? Error using ==> save
Unable to write file NKMest/prior/definition.mat: No such file or directory.

Error in ==> set_prior at 282
save([M_.dname ‘/prior/definition.mat’],‘bayestopt_’);

Error in ==> dynare_estimation_init at 125
[xparam1,estim_params_,bayestopt_,lb,ub,M_] = set_prior(estim_params_,M_,options_);

Error in ==> dynare_estimation_1 at 37
[data,rawdata,xparam1] = dynare_estimation_init(var_list_);

Error in ==> dynare_estimation at 62

Error in ==> NKMest at 188

Error in ==> dynare at 120
evalin(‘base’,fname) ;
NKMest.mod (1.57 KB)

It seems like a problem with your write-permissions.