closing an InputStream