Added output to error log on db error