replaced usage of rm with secure delete