close stream at end of session
Merge pull request #79 from MarvinT/bug77

addresses bug #77