Safer resource handling in Responder