ReadTextFile now adds a zero character at the end.
some changes to the callback systems