Catch errors on flush.