Capture stderr output of commands.