fixed test to pass when writing and comparing files.