Changes use of structs to process threads

- Structs were made redundant with
63b8e7516c9d84d9fe08cecb630d8a192517c274 and have now been removed
completely. The filename is still passed to the ProcessFileThread
function.
Fixes ProcessPipe function EOF detection

- EOF detection in ProcessPipe function no longer hangs and now works
as intended.
- The tries counter check has been moved to the main while loop. This
means the fifth try no longer runs the loop. This is okay as EOF is
triggered just the once (from simulations).