rewrite trashCtrl of open function