fix: error in export with option view output as text

Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>