Added a function for IOhandler write
Removed an unnecessary assert
Fix MemoryWrite bug
Added index bound checking in floating point interpolation