fix bugs; single thread pool for all files