Now data is not saved if writing past the original length of the file.