refactor of the task to get the files for each pipelineId sections