Added write header function definition to header.h
Improved header functions signatures