working but with unhandled error in pipe
bug fix and test for ECONN error