record error file