Update SortYieldFiles

- Variable declarations.
- Create files if the don't exist.