check existence before doing anything else