fix 5.3 compat and 32/64bit issues
add IO_Exception for all I/O related errors