Debugging I/O code