More helpful error msg for invalid pattern