cleanup logging, add some stats, disable nagle