fix main
don't try to Sync on stdout