Ignore txt and csv files
Refactor output loop

- Separate data from output
- Add output summary to csv