Move the db.open stdand alone