file mod: rm unnecessary temp var to avoid shadowing outer mkdir() func