This forces the file name to be copied. Better use a const &.