Added code to print errors from the SD card