Finished refactoring assertFileHeaderWrittenFromList