Added Error Handling if Pattern Not Found