If you are not satisfied with the 16/32GB of internal storage on your HTC One M8, you can easily increase the amount by inserting an SD card or a USB flash storage (via a USB OTG cable).
But how to Safely remove these external storage?
To Unmount USB Storage / Unmount SD Card on HTC One M8 do as follows:
1. Open Settings and go to Storage.
2. Scroll down and under SD Card settings, tap the "Unmount SD Card" and after a few seconds the SD card can be safely removed
3. Now head to the USB Storage settings, and Unmount USB storage as well