added option for cancel script with ctrl+c