Added optional error header support