report AFI writing error correctly