Change exit(-1) to exit(EXIT_FAILURE)