Finish datastore function and system closure