now manually closing the input stream