Create a wrapper function using va_args to capture the error and (optionally) send it to a global function pointer, as well as stderr