Improving the windows status check