refactored files enumeration operations - great performance improvement

refactored files enumeration operations - great performance improvement