Added sample program with explanation on reading and writing