Weak detection of file folder and add a class accordingly