Generalize footer reading from file

Summary:

Generalizing this process will help us to re-use the code for plain table

Test Plan:

ran ./table_test