If the pattern is not set, show a warning message and abort the execution.