Index: /issm/trunk-jpl/src/c/classes/IoModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/IoModel.cpp	(revision 14511)
+++ /issm/trunk-jpl/src/c/classes/IoModel.cpp	(revision 14512)
@@ -338,6 +338,6 @@
 
 				/* Read the record length and the data type code: */
-				fread(&record_length,sizeof(int),1,this->fid);
-				fread(&record_code,sizeof(int),1,this->fid);
+				if(fread(&record_length,sizeof(int),1,this->fid)!=1) _error_("Cound not read record_length");
+				if(fread(&record_code  ,sizeof(int),1,this->fid)!=1) _error_("Cound not read record_code");
 
 				#ifdef _HAVE_MPI_
@@ -1288,5 +1288,5 @@
 
 			/*read the record length, and use it to skip this record: */
-			fread(&record_length,sizeof(int),1,fid);
+			if(fread(&record_length,sizeof(int),1,fid)!=1) _error_("Could not read record_length");
 			fseek(fid,record_length,SEEK_CUR);
 			lastindex=index;
@@ -1335,8 +1335,10 @@
 				/*Ok, we have found the correct string. Pass the record length, and read data type code: */
 				fseek(fid,sizeof(int),SEEK_CUR);
-				fread(&record_code,sizeof(int),1,fid);
+				if(fread(&record_code,sizeof(int),1,fid)!=1) _error_("Could not read record_code");
 
 				/*if record_code points to a vector, get its type (nodal or elementary): */
-				if(5<=record_code && record_code<=7)fread(&vector_type,sizeof(int),1,fid);
+				if(5<=record_code && record_code<=7){
+					if(fread(&vector_type,sizeof(int),1,fid)!=1) _error_("Could not read vector_type");
+				}
 				found=1;
 				break;
@@ -1344,5 +1346,5 @@
 			else{
 				/*This is not the correct string, read the record length, and use it to skip this record: */
-				fread(&record_length,sizeof(int),1,fid);
+				if(fread(&record_length,sizeof(int),1,fid)!=1) _error_("Could not read record_length");
 				/*skip: */
 				fseek(fid,record_length,SEEK_CUR);
Index: /issm/trunk-jpl/src/c/shared/Exp/exp.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/Exp/exp.h	(revision 14511)
+++ /issm/trunk-jpl/src/c/shared/Exp/exp.h	(revision 14512)
@@ -161,4 +161,5 @@
 	if(pclosed) *pclosed=closed;
 	else         xDelete<bool>(closed);
+
 } /*}}}*/
 /*DataSet* ExpRead(char* domainname){{{*/
Index: /issm/trunk-jpl/src/c/solutions/dakota_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/dakota_core.cpp	(revision 14511)
+++ /issm/trunk-jpl/src/c/solutions/dakota_core.cpp	(revision 14512)
@@ -59,4 +59,5 @@
 	char*              dakota_output_file = NULL;
 	char*              dakota_error_file  = NULL;
+	const char*        parallel_lib_string= "serial";
 	int                status=0;
 	Dakota::ModelLIter ml_iter;
@@ -75,5 +76,5 @@
 		// Instantiate/initialize the parallel library and problem description
 		// database objects.
-		Dakota::ParallelLibrary parallel_lib("serial"); //use our own ISSM Dakota library mode constructor, which only fires up Dakota on CPU 0. 
+		Dakota::ParallelLibrary parallel_lib(parallel_lib_string); //use our own ISSM Dakota library mode constructor, which only fires up Dakota on CPU 0. 
 		Dakota::ProblemDescDB problem_db(parallel_lib); 
 
