Handle exceptions in item.write and use plugin abort