fixed bug in visibleFiles