Added exception handler to primary iteration to catch any errors from weird tree formating issues. Also added an ugly hack error log to keep track of which trees are currently giving issues.