More robust exists for hive. 

Instead of trying to scrape the output for a "table not found" we can just look at the database and see if the table exists by querying for all the tables with the exact name.
This would give a false positive if table is a substring of any other table name or other part of the output right?