Added signal handler to API