Debug for mutex in thread