Adds checking for header / footer exists