Added ctrl+c handling