TJ: decorator for stderr/stdout replacement.