Remove special case when appending at eol
Return the number of failed tests so that failure gets propagated
Update doc