add logging method for lock/unlock