Removing duplicate directory creation