Remove exception when printing error for failure removing script state.