Persist errors into sqllite