YOu should be able to replace this check with just MCStringIsEmpty() (p_filename should never be nil).