add support for header and footer in case of filehandle method fh