File reading and writing test.