changed the way we check if the old database exists.