setup tm dir at startup