Shan,
Look at the help file for Write File.vi:
"Write File Details
If the location computed by this function occurs before the beginning of the file, for example if pos mode is 0 and pos offset is –10, this function places the file mark at the beginning of the file and returns an error. If the location occurs after the end of the file, for example if pos mode is 1 and pos offset is 10, this function places the file mark at the end of the file and returns an error."
If your file is empty assigning a pos offset of 100 will produce an error. Try writing 100 null characters (hex 00) to the file and then overwriting later with your header.
Lynn