Writing and reading a file via a random way or a sequent way.