Improved UT to modify a writable file.