fix console and io error