Pim 3201: Make the csv archiver work only with csv files

| Q                    | A
| -------------------- | ---
| Bug fix?             | Yes
| New feature?         | No
| BC breaks?           | Yes
| CI currently passes? | ?
| Tests pass?          | Yes
| Scenarios pass?      | ?
| Checkstyle issues?*  | No
| PMD issues?**        | No
| Changelog updated?   | Yes
| Fixed tickets        | PIM-3201
| DB schema updated?   | No
| Migration script?    | No
| Doc PR               | No
This block of code is essentially duplicated, move it to let()