fixed issue with names generated for sub directories