Turning off the SD card after writing to it, hoping that this will resolve the SD card problem.