Like was mentioned in the comments:
while ( (keep='n') || ('N') );
should (at least) be changed to
while ( (keep == 'n') || (keep == 'N') );
Also, this loop:
for(int i = 0; Stats[i]; i++)
Will only terminate when Stats[i]
evaluates to false, which will only happen when Stats[i] == 0
. This loop is causing the extra chars in the file: the code keeps accessing out of bounds array elements until randomly the out of bounds element == 0. You probably want for(int i = 0; i < 6; i++)