Uses methods in the File class to check whether a file exists