Close the inputstream when done.