fix the issue with searching files after previous refactoring