remove unnecessary EOL in stdout & stderr