properly load error class