Write doc using livedb