Added niceDelete method which checks if files exist before deleting them to avoid no such file or directory errors