add feature: record error history