fix _filter to handle errors via stderr