update I/O layers to accept a context on creation