BUG: needed the pipestatus becaus eof tee command