Before your remove your external flash drive or hard drive make sure to eject it properly. On a Mac, you can drag the drive to your trash. Then wait. If you had a lot of large files on the drive open them you need to make sure they are closed and not being backed up anywhere. You will either get a message or the icon will still be visible until it is safe to pull the drive out.
On Window computers, the same applies though the icon to eject is on the lower right of your desk top. Once clicked, it will tell you when it is safe to remove the drive.
If you just pull that drive out, you risk having corrupted files. That occurs if some files are being used or backed up behind the scenes. On a MAC you can lose everything on the drive. Windows is more forgiving but you can easily see photos corrupted that were not ready to be removed from the computer on a drive.