More DB configuration and proper DB error check.