better error massages for logging