main loop now actually opens it's outstream