added feature to remove images and directory after destroy