Add debug checks to page search