Making the directory name creation more flexible