Checks a file to see if the file already exists and populates it