Remove enumerate function in the case of writing the output file