Added signal handler for finished processes