shut down cleanly on INT, TERM or QUIT