The code can correctly generate gv file now