Added Writebin.py for gendata.py