log error on pattern matching