The thing is that the error happens intermittently, I didn't think to save a copy of the dset that was corrupted, but simply replacing it with the original file did the trick, and re-running caused the error to go away. I agree that it would be could for abids_tool.py to terminate, but poking around it looks like the issue is that 3drefit is not actually giving a non-zero exit, so abids_tool.py couldn't detect a failure unless it scanned the output for the word "ERROR." Then going further down the rabbit hole, it looks like 3drefit does not given an error because the nifti reader is not giving an error. In fact, in thd_niftiwrite.c, _all_ error messages return an exit code of 0.