wrap your IO in a context manager