Added path checking functions