Added function for safe rm