the program writes out to thw 5 files every time