check if a page exists before generating a new page.