Fix error io checking macros