adds doc on fail