make ErrorAndExit take vargs
refactor record retrieval in preparation for other subcommands