Writes state to file