Code is more portable (older compilers does not accept ofstream with std::string...