moves the scopeof a variable used in rescue block