Fix Segfault with incorrect db_conf file

Also small bit of optimize loading DB_CUSTOM_V3 conf file