Added missing 'finally' statement