Added io.initErrorHandler function