Use std::endl to make sure stderr buffer is flushed before exit()