index: s/afterWrite/onwrite/