Added check for possible infinite loop in treecat. File starting with HOLE