[#123]Always open db before use