Updated fileWriter plus test demo code