SD card routines updated