add verbose error logging when schema is invalid