added logging option for team city + refactored logging + removed documentCount.