Bug exists in the writing. Writes too much on the second test and also the first write for each of the tests is undefined. maybe need to write a cycle sooner.