Fixed locate TC bug

Only checking for file existance once.