fixed infinite loop for new test files