add signal handler for nice