added condition statement which ignore hidden files nand folders because they can't be opened