Fixing I/O operations