simplified checking if db is opened