make sure state is not running when writing parser result