Append char instead of String
0 means empty file, not chunked
Don't use replace but addAfter+remove so that first frame is not lost, close #471
minor clean up