Change filename concatenation to use stringstream