move error class from kwf