catching KeyboardInterrupt as it's the shutdown method