save log metadata only when logs are saved
removed unnecessary comment, and bug fixed
Merge pull request #30 from ajy/master

fixed a bug i introduced