fix error on mkdir (maximum nested function level)