added cleanup mechanism to launch plugins