fixes a bug with user wanting to continue

fixes a bug where when the user says yes i wanna continue, the prompt
for the file gets printed twice.
also added error checking so the program will continue to prompt the
user if neither y or n is entered (otherwise the program will terminate
if anything other than y is entered)