Added promises to create directories