add signal handler(INT, TERM)