Safey device and Malfunction detector