Add optional callbacks to output_hdr and output_fragment