[INTERNAL] replaced QTextStream with ofstream to avoid size limitations