Working with Stdin and Stdout