   #ifdef DEBUG
     Serial.print(F("saving nfc <-> album: "));Serial.println(trackDbEntry);
   #endif
-  /*
-  // FIRST write the trackDbFile --> ALBUMNFC.TXT
-  File file = SD.open(trackDbFile, FILE_WRITE);
+  #ifdef ALBUMNFC
+    // FIRST write the AlbumNFC file  --> ALBUMNFC.TDB
+    File file = SD.open(albumNfcFile, FILE_WRITE);
+    bytesWritten = file.write(trackDbEntry, sizeof(trackDbEntry));
+    file.close();                                   // and make sure everything is clean and save
+    if (bytesWritten == sizeof(trackDbEntry)) {
+      #ifdef DEBUG
+        Serial.print(F(" ok. wrote "));Serial.print(bytesWritten);Serial.print(F(" byte(s) to "));Serial.println(albumNfcFile);
+      #endif
+      success = true; 
+    } else {
+      #ifdef DEBUG
+        Serial.print(F("  error writing "));Serial.println(albumNfcFile);
+      #endif
+      digitalWrite(warnLedPin, HIGH);
+    }
+  #endif
+  
+  // SECOND write the TrackDb-File --> e.g. larsrent.txt
+  memset(trackDbFile, 0, sizeof(trackDbFile));          // make sure var to hold path to track db file is empty
+  strcat(trackDbFile, trackDbDir);                   // add the trackDb Directory to the 
+  strcat(trackDbFile, "/");                          // a / 
+  strcat(trackDbFile, plrCurrentFolder);             // and the filename
+  strcat(trackDbFile, ".txt");                       // plus of course a txt extension
+  SD.remove(trackDbFile);                            // we want the file to be empty prior writing directory and track to it, so we remove it
+  
+  #ifdef ALBUMNFC
+    file = SD.open(trackDbFile, FILE_WRITE);         // used in case the albumnfc.tdb file is written first
+  #endif
+  #ifndef ALBUMNFC
+    File file = SD.open(trackDbFile, FILE_WRITE);    // used in case we only write the TrackDB files
+  #endif
+  
   bytesWritten = file.write(trackDbEntry, sizeof(trackDbEntry));
   file.close();                                   // and make sure everything is clean and save
   if (bytesWritten == sizeof(trackDbEntry)) {
     #ifdef DEBUG
       Serial.print(F(" ok. wrote "));Serial.print(bytesWritten);Serial.print(F(" byte(s) to "));Serial.println(trackDbFile);
     #endif
-    success = true; 
+    success = false;
   } else {
     #ifdef DEBUG
       Serial.print(F("  error writing "));Serial.println(trackDbFile);
-    #endif
-    digitalWrite(warnLedPin, HIGH);
-  }
-  */
-  // SECOND write the tDirFile --> e.g. larsrent.txt
-  memset(tDirFile, 0, sizeof(tDirFile));          // make sure var to hold path to track db file is empty
-  strcat(tDirFile, trackDbDir);                   // add the trackDb Directory to the 
-  strcat(tDirFile, "/");                          // a / 
-  strcat(tDirFile, plrCurrentFolder);             // and the filename
-  strcat(tDirFile, ".txt");                       // plus of course a txt extension
-  SD.remove(tDirFile);                            // we want the file to be empty prior writing directory and track to it, so we remove it
-  File file = SD.open(tDirFile, FILE_WRITE);      // and now we open / create it
-  bytesWritten = file.write(trackDbEntry, sizeof(trackDbEntry));
-  file.close();                                   // and make sure everything is clean and save
-  if (bytesWritten == sizeof(trackDbEntry)) {
-    #ifdef DEBUG
-      Serial.print(F(" ok. wrote "));Serial.print(bytesWritten);Serial.print(F(" byte(s) to "));Serial.println(tDirFile);
-    #endif
-    success = false;
-  } else {
-    #ifdef DEBUG
-      Serial.print(F("  error writing "));Serial.println(tDirFile);
     #endif
     digitalWrite(warnLedPin, HIGH);
     success = false;

//            V    AA     AA  RR   RR
//
// mp3 player variables
char plrCurrentFolder[]     = "system00";                // directory containing the currently played tracks - system00 is the system message directory
char filename[]             = "/system00/track001.mp3";  // path and filename of the track to play - we start with the welcome track
byte firstTrackToPlay       = 1;                         // the track number to play (used for the loop)
char nextTrackToPlay        = 1;                         // the track number to play next (can also be the previos number or a -1 in case of an error)


// file to hold the last played album (aka directory) name - from here we may retrieve other data from the trackDb 

// to use the Adafruit NFC library to get the Tag UID and retrieve the directory from the trackDb 
// uncomment the following line. 
#define NFCTRACKDB 1

// uncomment to enable a special file albumnfc.tdb in which all album <-> nfc
// connections are stored - additional to the TrackDb files
//define ALBUMNFC 1

// uncomment the next line to enable resuming the last played album on switch on
// this is achieved via a special file on the SD card and works without a tag but uses the pause/resume button instead
