Writing Program state