add failcntxt

add an optional failcntxt