Fix return code handling in m_exit_on_error