added EOF handling for streaming stdin from example commandline app