I'd check for emptiness rather than existence.
The clear and remove commands don't delete the file when the last domain is removed.