You'll need to modify the beginning of this function where it is doing 'if (p_filename == nil)' to be 'if (MCStringIsEmpty(p_filename))'.