seems like the string class used to handle filenames doesn't like optimizations, as it fails spectacularly