added ignore flag to all utf .decode('utf-8', 'ignore') statements