IF THE OUTPUT IS DISCORDANT, THEN IT'S A PROBLEM WITH YOUR OUTPUT FUNCTIONS OR THE ORDER IN WHICH YOU CALL THEM. CAN YOU POST THE JUST FUNCTIONS WHICH WRITE OUT, A SAMPLE DESIRED OUTPUT, AND A SAMPLE ACTUAL OUTPUT?
I DON'T THINK ANYONE IS GOING TO HELP YOU VIA EMAIL.