added write_syst.py