Improve handling of CTRL+C exceptions