Added if statement to catch files that are not of correct type (txt, xml, and txt respectively)