add macro WRESIOERR for handling i/o errors
use WRES... macros for parameters mapping to enable use standard ISO C IO functions