catch io stream closed ex