Added tracing for debugging.