 static boolean getDirAndTrackToPlay(boolean);  // retrieve the directory and track number either from the Tag (true) or from last played session file (false)
 static boolean writeTrackDbEntry(void);        // store Tag UID, plrCurrentFolder and firstTrackToPlay in the trackDb (files on SD)
 
+
+// prototype for NFC check for tag presence
+#ifdef NFCTRACKDB
+  static boolean checkTag(void);        // check if the tag is still on the reader - returns true or falce
+#endif
+
+// prototype for volume control via potentiometer
+#ifdef VOLUMEPOT
+  static void plrAdjustVolume(void);    // function to check for changes on the volume control and adjust volume accrodingly
+#endif
+
+
 // these are the prototypes for the mp3 player controller
-#ifdef VOLUMEPOT
-static void plrAdjustVolume(void);       // function to check for changes on the volume control and adjust volume accrodingly
-#endif
-static void plrStop(void);               // stops the player and return 0
-static void plrTogglePause(void);        // pause and unpause the player and return 0
-static char playAlbum(byte);             // plays the album from plrCurrentFolder: returns -1 for error or a higher 
-static char playTrack(byte, char);       // plays a track as defined by the global vars: returns -1 for error, 0 for success and track number to play next
+static void plrStop(void);              // stops the player and return 0
+static void plrTogglePause(void);       // pause and unpause the player and return 0
+static char playAlbum(byte);            // plays the album from plrCurrentFolder: returns -1 for error or a higher 
+static char playTrack(byte);            // plays a track as defined by the global vars: returns -1 for error, 0 for success and track number to play next
 
 
 // prototype for warning
 static void issueWarning(const char[], const char[], boolean); // the new warning method
 
+
 // these are the prototypes to work on files and general helpers
-//void printDirectory(File, byte);  // print out the content of specified directory on serial console
-static byte countFiles(File);              // return the number of files in a directory passed as a File descriptor
+static byte countFiles(File);           // return the number of files in a directory passed as a File descriptor
+
 
 // helper functions to set global vars
-static boolean setFileNameToPlay(byte);    // sets filename of the track to play from global vars plrCurrentFolder and plrCurrentFile and returns true if it exists
+static boolean setFileNameToPlay(byte); // sets filename of the track to play from global vars plrCurrentFolder and plrCurrentFile and returns true if it exists
 static void setTrackDbEntry(void);
 
 
 // these are the prototypes for the led
-static void switchLightState(void);        // switch the boolean var lightOn from true to false and vice versa - in case light is lightOn is set to true, lightStartUpTime is set to millis()
-
+#ifdef OPRLIGHT
+  static void switchLightState(void);   // switch the boolean var lightOn from true to false and vice versa - in case light is lightOn is set to true, lightStartUpTime is set to millis()
+#endif
 
 //
 //       SSSSSS  EEEEEE  TTTTTTTT  UU   UU   PPPPP

// SETUP NFC ADAPTER
//
#ifdef NFCNDEF
// these includes are sued for the NDEF implementation
#include <PN532_SPI.h>
#include <PN532.h>
#include <NfcAdapter.h>
#define PN532_SCK     13    // SPI Clock shared with VS1053, SD card and NFC breakout board 
#define PN532_MISO    12    // Input data from VS1053, SD card and NFC breakout board 
#define PN532_MOSI    11    // Output data to VS1053, SD card and NFC breakout board 
#define PN532_SS      10    // NFC breakout board chip select pin
PN532_SPI pn532spi(SPI, PN532_SS);
NfcAdapter nfc = NfcAdapter(pn532spi);
#endif

#ifdef NFCTRACKDB
// INCLUDE Adafruit NFC LIbrary here
#endif



  boolean weHaveATag = false;              // is set to true if a tag is present and false, if not
  boolean loopWarningMessageNoAlbumInfos = true;  // make sure we get the "no album info on tag" message at least once
  boolean loopWarningMessageNoFilesInDir = true;  // make sure we get the "no files in dir" message at least once

  // this allows for the pause/resume button to be pressed without a tag being present
  // in this case the last played album is resumed
  #ifdef RESUMELAST
    #ifdef BUTTONS
      btnVal = analogRead(btnLinePin);
      if (btnVal > minBtnValue && (millis()-btnPressTime) > btnPressDelay) { 
        if ( ((btnVal - btnValDrift) < btnPauseValue) && ((btnVal + btnValDrift) > btnPauseValue) ) { 
          #ifdef DEBUG
            Serial.println(F("Pause Button Pressed"));
          #endif
        }
      }
    #endif
  #endif
  
  #ifdef DEBUG 
    Serial.print(F("."));
