redirect errors to stderr
redirect stderr to stdout in test