use CAF::FileWriter to allow tests
add more tests