ERROR: no mode ("xml" or "img") supplied