opens, reads, and parses files