Send stderr to the original stream during optimization