Update writedms.py