finally clauses for preventing unreleased locks