added CTRL+C quit functionality to loop cmd