check if the current path exists