handle syntaxerror in stdout