added utils for error header and footer