adding check to see if file is in swift