Do not free tableFiles when it is NULL

and improve the naming