Modify gen_input.py to make it can generate num > 256
Now can write result to outfile