override WriteHeader