catch errors, and set the name of the header as the full header