Make parse_file() a function