Checking device security