raft: logging state change events and events on bad path

we need to do logging when there is something bad happens. 
The default output is os.Stderr, not os.Stdout.