Change rmtree function