Add handler for SIGUSR1 and SIGINT