Persist error lines and commit model in db