add check to test shutdown