add error management when no joystick is plug or no document open in SW