Added handlings of InterruptedIOException.