main: unload modules on forced exit