[FIXED JENKINS-19752] write in the correct outputstream