+ } elsif ( $tag->error =~ m/auth/ ) {
+ warn $tag->error,"\n";
+
+ # disconnect from reader so we can run mfoc
+ RFID::Libnfc::nfc_disconnect($r->{_pdi});
+
+ my $file = "cards/$uid.key";
+ unlink $file;
+ warn "# finding keys for card $uid with: mfoc -O $file\n";
+ exec "mfoc -O $file" || die $!;