database init and open debug