close input stream after use