catch ResourceClosedError