added tests for WriteAll