add channel restore support

- now each states are following flow id and delimited by ### for easy
  testing...