some patch for logging