remove use of deprecated method for file search, use thread-safe method