Changing the haargen.cpp so it writes to a file its products.