Index: /issm/trunk-jpl/src/m/io/fileptr.js
===================================================================
--- /issm/trunk-jpl/src/m/io/fileptr.js	(revision 20254)
+++ /issm/trunk-jpl/src/m/io/fileptr.js	(revision 20255)
@@ -33,5 +33,5 @@
 			this.buffersize=0;
 			if (this.mode=='w'){
-				this.increment=options.getfieldvalue('increment',80000); //80000 bytes,  10000 doubles.
+				this.increment=options.getfieldvalue('increment',800000); //80000 bytes,  10000 doubles.
 				this.buffer=new ArrayBuffer(this.increment);
 				this.view=new DataView(this.buffer);
@@ -72,5 +72,8 @@
 				else{
 					if (!IsArray(value[0])){
-						if(this.ptr+value.length*8>=this.buffer.byteLength)this.resize();
+						if(this.ptr+value.length*8>=this.buffer.byteLength){
+							this.resize();
+							if(this.ptr+value.length*8>=this.buffer.byteLength)throw Error('fileptr.fwrite error: need to increase increment size!');
+						}
 						for(var i=0;i<value.length;i++){
 							this.view.setFloat64(this.ptr,value[i],true);
