add writeFile tests
add writeFile functionality