every batch of 300, dump thread ids.
tids now written line by line