add decode xlog file & optimize code framework