bin/minimize.py: added missing checks of error status in candidates