Adds thread startup/shutdown tracking