sophia: refactor logplay; get ready for external driven recovery