-Abort thread for optimization after application is closed