When reading several files and the trying to write  And outputfile fileheader incorrect 