fixed bug

string buffer out of memory on large files