added code for instrumenting IOs