finishes on end() when output is stdout