Adding many seconds of delay in your program is a workaround, but the caveat is this issue is still not fully understood (by me, anyway) so any workaround is more guesswork than reliable engineering (and the failure mode is a badly corrupted filesystem on the SD card).3: SD card sharing - Sharing the SD card between the interrupt-driven USB code and a user level (polling-only) library like SD or S