removed rais exception to allow check if db is opened