Excluding long paths