checking size while appending to a file always returns the initial size of the file

Need to clear the cache as is done in other methods so the size is returned correctly