Minding the Machines: Preventing Technological Disasters