Fixed writing test. Added test for new file.