update putTrace to handle void pointer