Renamed checkTable to tableExists