add validate uid logic, debug log