Fixed NPE.
Handle ZK failures more robustly.
Avoid crazy log replay problem.
Handle another exception, removed unused code.
Fix for crazy fail/retry problem.