Signal handler for SIGTERM implemented