Adding clean shutdown code to ocuda module.