fix bugs for annotation consumer, add output file, update types