Fixed task factory to remove formatting members if files.length == 0