fix sync bug & add log manager