less loc and use Plugin#error