better error messages when input tables don't exist