if (not) exists checks and a few error messages