When writing to files we often just write without making sure that the actual file contents actually written. Lets add features to do a read-after-write verification when writing to files. Change-Id: I7be842004102f4998af376790c97647c107be3d5