Java program for file searching using multiple threads