Added support for reading from stdin.