fixed problem with sstream filenames