debugging sd card logic