releasing inputstream