update custom search pattern implementation

plus write error message with old config style