Index: /issm/trunk-jpl/src/c/classes/IoModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/IoModel.cpp	(revision 23577)
+++ /issm/trunk-jpl/src/c/classes/IoModel.cpp	(revision 23578)
@@ -454,6 +454,6 @@
 
 	/*Initialize array detecting whether data[i] is an independent AD mode variable: */
-	this->FetchData(&autodiff,"md.autodiff.isautodiff");
-	this->FetchData(&iscontrol,"md.inversion.iscontrol");
+	this->FetchConstants(&autodiff,"md.autodiff.isautodiff");
+	this->FetchConstants(&iscontrol,"md.inversion.iscontrol");
 
 	if(trace || (autodiff && !iscontrol)){
@@ -2537,4 +2537,7 @@
 		_error_("Cannot fetch \""<<data_name<<"\" does not start with \""<<mddot<<"\"");
 	}
+	if(fid==NULL){
+		_error_("Cannot fetch \""<<data_name<<"\": file pointer invalid ");
+	}
 
 	/*Go find in the binary file, the position of the data we want to fetch: */
