read the file directly into a stringstream buffer