Don't format just yet! Unmount the thumb drive and, from a terminal run
the command
sudo fsck /dev/sd*1
(you need to replace the '*' with the letter assigned to the pendrive -
the only way I know to find this is through gparted, although there is
undoubtedly a better way of doing it). This will undoubtedly find (and
hopefully fix) quite a few errors on the drive.
As to why it unmounted in the first place?