adding test for write header