use write callbacks for error checking [#44359817]