Added basic search and regex error handeling