Added header and footer checks