only print to stderr and stdout in debug mode