split utils.misc to utils.system
add some helper functions to utils.system