closelog_internal()
{
  if (!connected)
    return;

  __close (LogFile);
  LogFile = -1;
  connected = 0;
}
closelog_internal()
{
  if (!connected)
    return;

  __close (LogFile);
  LogFile = -1;
  connected = 0;
}