So what you have been till now to remove the USB Pen Drive from your computer? Either safely remove it or just unplug it from the system. But this does not work always and especially when you have some program from the drive running in your system.
Say, you have opened an image from the USB drive and before closing it you try to Safely Remove the drive from the system, it will surely give you an error saying that it is being currently used by some application.
Then instead of closing all the applications running from your pen drive and ejecting it just use this free tool called EjectUSB which will not only close all your running applications but will also safely remove your USB drive.
What you need to do is just unzip the application and place the EjectUSB.exe file in the USB drive. Double clicking the exe file will do the rest of the work for you. Apart from this, the tool also ensures that your system remains clean of the temporary and recent files created by the USB drive. You can change the settings by running the settings.bat file.