Now we won't load file if a directory is chosen