small improvement for outputStream