add check file exist functions