Add clean function when exit