Make sure to execute per-thread init before close()