TST: Issue #2806 added test forfromfile/tofile with large arrays
FIX: fixing handling tofile/fromfile for large arrays Issue #2806