fix some bug about sync and add some log