added --afi to set security after writing blocks