close input stream