use LOG_G instead of std::cerr