fixed swe VariantDIR
added error case