fixed various error loggings