Improve exception handling during tuning