Added checks to the searching scripts