checkFile function

Check whether file(s) exist