Gather error messages for command

Currently if command is failed their messages from stderr and base exceptions are lost. This fix allows to gather stderr output when command is failed