added stdout sync.