rename threadDirectory to teraDirectory