Add error_exit calls for optional deps.