I have a script that fails because some files are missing.
Running the script and piping it to grep
$ ./adder | grep Error
produces th
You need to redirect standard error stream (numeric code: 2) from first command in the pipe to standard output stream (numeric code: 1), like this:
$ ./adder 2>&1 | grep Error