Added exception handling for tracing initialization