flash: add error messages upon incorrect arguments to flash iteration