fixing streaming / stdin usage