Added exception handling for devices without os.