Optional argument for writing to memory buffer