Update check_pattern