perror() should not be given a trailing \n