Fixed UpToNearestSector bug
Added nullTerminating flag to writing strings
Implemented write function