use EXIT_FAILURE consistently