Merge pull request #414 from jcastillo-arm/jc/io_ret_values

Use standard error code definitions