signal handler for ctrl+c

for a proper shutdown