moving file parse to separate function

progressbar is working with fileParse func, now working on conditions
for other file reads