Added count and batch flags. Got random log sending working