enabling proper DB and emailing of errors