Update HTrace to 2.0 and add more hooks