Writes header separately