Add lock to logger
Separate PipeThread class file
Check empty line count