Add missing import, aot for exception