fixed error in directory creation