Added support for reading from stdin, removed stale exception.