Change validation about path

Now we validate a path, that needs to be a file path, or a dir path.