Added timed_run_trap_stderr function