WriteFileStart & WriteFileEnd + tests.