before read/write