add a function to check if a file exit