Change directory before deleting

Change directory before deleting