changes how filename is cast to a const char*