NewSDWriteSector and NewSDInit now work correctly using the function NewFileUpdate which mimics FSfclose.