Using the fileExists function causes a few other problems, better to make another one without the extra argument