Fixes to flush bin log cache if unexpected statement found.
Fixes bin log thread to fail gracefully if no class def found.