addede clean folder function so that intermediate outputs are deleted