put mutex in finally