Misc fixes for bin log rotate issues