Improve error handling for communication output.
Fix connection errors caused by Windows update(KB2992611).