HM/JPM: fixed stdout_replace_decorator and stderr_replace_decorator to keep original function's name