reworked umount script to allow use in all modules