fix up parser to add logging