fix a discarded exception in hClose