Implement executor service shutdown at appropriate places