write global headers