Fix variable rendering with files. Stop extra text when there are no variables