 
 bool writeRfidBlock(uint8_t sector, uint8_t relativeBlock, const char *newContent, uint8_t contentSize) {
   uint8_t absoluteBlock = (sector * 4) + relativeBlock;
-  MFRC522::StatusCode status;
-
 
   // Authenticate using key A
   Serial.println(F("Authenticating using key A..."));
-  status = mfrc522.PCD_Authenticate(MFRC522::PICC_CMD_MF_AUTH_KEY_A, absoluteBlock, &key, &(mfrc522.uid));
+  MFRC522::StatusCode status = mfrc522.PCD_Authenticate(MFRC522::PICC_CMD_MF_AUTH_KEY_A, absoluteBlock, &key, &(mfrc522.uid));
   if (status != MFRC522::STATUS_OK) {
     Serial.print(F("PCD_Authenticate() failed: "));
     Serial.println(mfrc522.GetStatusCodeName(status));

    key.keyByte[i] = 0xFF;
  }

  Serial.print(F("Using rfid key (for A and B):"));
  print_byte_array(key.keyByte, MFRC522::MF_KEY_SIZE);
  Serial.println();

  //Initialize the SdCard.
  if (!SD.begin(SD_CS)) SD.initErrorHalt();

  // initialise the music player
  if (! musicPlayer.begin()) { // initialise the music player
    Serial.println(F("Couldn't find VS1053, do you have the right pins defined?"));
    while (1) delay(500);
  }

    pairing = false;
  }

  // Reset watchdog timer
  yield();
  byte readBuffer[18];
  if (readRfidBlock(1, 0, readBuffer, sizeof(readBuffer))) {

    char readFolder[18];
    readFolder[0] = '/';
    // allthough sizeof(readBuffer) == 18, we only get 16 byte of data
    memcpy(readFolder + 1 , readBuffer, 16 * sizeof(byte) );
    // readBuffer will already contain \0 if the folder name is < 16 chars, but otherwise we need to add it
    readFolder[17] = '\0';

    // Store uid
    memcpy(lastCardUid, mfrc522.uid.uidByte, 4 * sizeof(byte) );

    if (playing) {
      stopMp3();
    }
    
    if (readFolder[1] != '\0' && switchFolder(readFolder)) {
      playMp3();
      playingByCard = true;
    }
  }

