Add class id to error messages