Put SD card code in a seperate file.