Refactored arrival check and added path ending closeness criterium.