Fix error handling
Check the datastore is writeable when initializing