Made dataManager closeable and put close in onDestroy