Removed irrelevant copied code in IO ops, fixed build.