[util.cpp#L216](https://github.com/bitcoin/bitcoin/blob/master/src/util.cpp#L216) 
if `fopen `failed, a null file pointer could be passed to `FileWriteStr(vMsgsBeforeOpenLog->front(), fileout);`
{
    
    
#if !defined(WIN32) && !defined(MAC_OSX) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
    try {
        std::locale(""); 
    } catch (const std::runtime_error&) {
        setenv("LC_ALL", "C", 1);
    }
#endif
    
    
    
    
    std::locale loc = boost::filesystem::path::imbue(std::locale::classic());
    boost::filesystem::path::imbue(loc);
}
bool SetupNetworking()