When the filename was flipped from being a static array to being dynamically allocated, the sizeof(filename) call wasn't updated. This always returns the size of the pointer, truncating the filename.
When the filename was flipped from being a static array to being dynamically allocated, the sizeof(filename) call wasn't updated. This always returns the size of the pointer, truncating the filename.