Tony update csv check function