updates header writing to dataOutputStream object to fix firebox bug