replace outstream with null stream