For many companies a lawsuit, industrial accident or discovery of illegal and shady practices is a public relations nightmare.