Added die on fail checking to db