Updated build_table and Exceptions in table_gen.py