Clean-up of I/O data structures and respective logging.