Changed failure signal to global def
Appear to have working version with header, but need to test more
Minor change