Now the program throws exceptions when running from an import.