[Core] open dataStore with writeback enabled

Needed for .sync() to work apparently?
Also explicitly close it when restarting.