I just simply save the data into files and read them out and then draw histogram. However, it appears this mistake though I changed nothing from the original code actually.