Add log file rotation on SIGUSR1
Refactor log stuff behind an interface
Change pools mutex to be RWMutex
Make count more idiomatic. Add test.