add trace log for debugging.