Added onerror listener for io.