Index: /issm/trunk/src/m/utils/Model/loadmodel.m
===================================================================
--- /issm/trunk/src/m/utils/Model/loadmodel.m	(revision 2627)
+++ /issm/trunk/src/m/utils/Model/loadmodel.m	(revision 2628)
@@ -8,11 +8,18 @@
 %      loadmodel path
 
-%some checks
+%check nargout
 if nargout>1,
 	error('loadmodel usage error: md=loadmodel(path)');
 end
+%check existence
 if ~exist(path)
 	error(['loadmodel error message: file ' path ' does not exist']);
 end
+%check that the file is readable
+[stat,mess]=fileattrib('larsenc8.model');
+if( stat==0 | mess.UserRead~=1),
+	error(['loadmodel error message: file ' path ' is not readable (permission dinied).']);
+end
+%check number of variables
 if length(whos('-file',path))>1,
 	error(['loadmodel error message: file ' path ' contains several variables. Only one model should be present.']);
