save log metadata only when logs are saved
removed unnecessary comment, and bug fixed