Besides, I think it will be nice to throw an exception indicating what happened. If the user wants to clear the last chunks, it will be nice to add a method to do the job by user demand. In this way, at destruction stage the size of the file will be zero and the exception won't be thrown.