Added write header function definition to header.h