use one thread to filter files that needs loaded; beautify codes.