Fixed syntax errors and bad imports
Added missing imports for failure calls