IOException related cleanups