update to eliminate some finally blocks