Add graceful shutdown when ctrl+c is pressed, closes #5