Is it possible to have function return the generated header content? The result could be used in other script.