Change file reading and writing at lab4. Add lab5 with some bugs