added creation of directories