inlined init method
added test case for adding newlog directory to index