Simplified finally close pattern.