fix output isue of printf fflush