read single files line by line
performance tuning
code cleanup