fix the iteration and dict key definition for the output file processing