switched to simple looping writeTextFile() calls