break file up into chunks amongst threads, fixing bug 671