Insert your SD card in another phone to make sure the issue is in SD card, this way you will get to know that something is getting wrong with the software.
The Code 10 error mainly occurs due to hardware and device driver issue or to compatibility issues between hardware drivers and additional software that is installed in Windows. Update your drivers or if still the issue not gets fixed, try to insert your data cable in any other computer and see what happens.