Replace exit(1) with exit(EXIT_FAILURE)