Wait for exit