Playing with reading and writing files