Changes: check folder exists before delete it