Remove strip_blank_lines_at_end method and iterate from dialog_command.