Contents must be cleared after writing.