read and write the content