Now the array hnums is written to the file hhist.txt after each bin (not every mc step)