Changed failed? method to explicitly check if result == 'FAILURE' because of some other unknown intermediate status