Added functionality to limit lines of trace.