Some USB flash drives don't respond quickly enough to an unmount request from the Mac. In that case the only alternative is to use a different flash drive, presumably a faster one.
For reference, the following is the technique I use.
Prerequisites:
Format the USB device as Mac OS Extended (Journaled) using GUID Partition Map. Make sure its icon is present on your Desktop. Its name is not important because createinstallmedia will change it. Also, the Install macOS Sierra app must be present in your Mac's Applications folder before entering the Terminal command. Otherwise the pathname won't be correct.
Make the Finder's Applications window small enough so that you can see it, the Terminal window, and the USB drive icon, all at the same time.
Then: Select the following line by dragging your cursor from just prior to the word sudo to past the word volume:
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume
Then, Edit > Copy.
Go to the Terminal window, paste that line into the Terminal window, and type a space character. Stop right there; do not press Return.
Drag the USB flash drive icon from your Desktop to the Terminal window, and stop again.
Then, type (or copy/paste) the following into Terminal:
--applicationpath
... followed by another space character.
Then, drag the Install macOS Sierra icon from your Applications folder into the Terminal window.
Finally, you can press Return.
This is an example of what should happen. The name of the USB drive is "untitled" in the following:
MacBookAir2:/ john$ sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/untitled --applicationpath /Applications/Install\ macOS\ Sierra.app
Password: (type your Admin password - it will not be echoed, not even with •••• characters. Then press Return)
Ready to start.
To continue we need to erase the disk at /Volumes/untitled.
If you wish to continue type (Y) then press return: Y
Erasing Disk: 0%... 10%... 20%... 30%...100%...
Copying installer files to disk...
Copy complete.
Making disk bootable...
Copying boot files...
Copy complete.
Done.
MacBookAir2:/john$
When it's finished the name of your USB installer will be Install macOS Sierra and it will be selectable as a bootable device in Startup Manager. Refer to "Use Startup Manager" in How to set up and use an external Mac startup disk - Apple Support.