first pass at not closing stdin
refactoring argument splitting
handling reading from stdin closing in stream