added safe_rm