Add abort flag check.