Added on process exit, to prevent RRD data loss.