Fix header output in case of failure.