add checkFileExists