add support for sigterm/sigint