changes for file append issue