void sync()
Writes the data stored in temporary buffers to permanent storage. Calls the function set by set_sync_callback ] when done.