Fix a bug in the writing of the new header file