Debug writeState().