New VarMod driver, better handling of error state in context switch