1. records unlock is done on final clause.
2. locks logging was improved.