Re implemented path checking.