need to create one more thread to write matched lines to pipe2
all threads work
removed debug messages