added comments to help understand perms in lib_misc.erl