Make LeakDataWriter period configurable, close #2191