Finish nicely on SIGTERM, for example on system shutdown