updated path checking