fix for writing file names that are super short and for nplMath.