Updated error throws

Added error check: checks that the keywords were actually found in the
folder.