fixed the creation of directory