Fixed getVar calls and updated tps to use fileRead