better warning for invalid path