Error formatting SD card

Can you umount the USB and then open a terminal and run

badblocks -w -s -o error.log /dev/mmcblk0p1