Synchronous / Asychronous file writing