moved logic to get test method lower in function

as the entire process will abort if there is no project settings file I moved the logic for getting the test method until after
the potential abort so it would be more efficient.