Added routine for setting to null char according to file format.