Fix memory leak; log mining upgrade
Improve scripts; OK results for ver1 select