Check for invalid files

Check for invalid files or file(path)