fix default write and added tests
0.0.6