Added SIGTERM process cleanup functions