Tune generate script