Added proper support for appending non-EOF data.