updated tests

added test for new file writing