Moved SIGPIPE handler to LoopThread