Added exception handling to fit_traces plotting