added debugging for printing from SD card